package com.daoeping.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Cop_companyuser entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "cop_companyuser", catalog = "daoeping")
public class Cop_companyuser implements java.io.Serializable {

	// Fields

	private Integer id;
	private Integer companyId;
	private Integer contact;
	private Usr_user usr_user;
	private Cop_companyinfo cop_companyinfo;
	
	// Constructors


	/** default constructor */
	public Cop_companyuser() {
	}


	/** full constructor */
	public Cop_companyuser(Cop_companyinfo cop_companyinfo, Integer contact,Usr_user usr_user) {
		this.cop_companyinfo = cop_companyinfo;
		this.contact = contact;
		this.usr_user = usr_user;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	@ManyToOne
	@JoinColumn(name="company_id")
	public Cop_companyinfo getCop_companyinfo() {
		return cop_companyinfo;
	}

	public void setCop_companyinfo(Cop_companyinfo cop_companyinfo) {
		this.cop_companyinfo = cop_companyinfo;
	}
	
	@Column(name = "contact", nullable = false)
	public Integer getContact() {
		return this.contact;
	}

	public void setContact(Integer contact) {
		this.contact = contact;
	}

	@ManyToOne
	@JoinColumn(name="user_id")
	public Usr_user getUsr_user() {
		return usr_user;
	}

	public void setUsr_user(Usr_user usr_user) {
		this.usr_user = usr_user;
	}
	

}